fix: add refresh_regions utility and auto-refresh regions.json at build time.#163
Conversation
…ld time. - Add `contentstack_management/region_refresh.py` exposing a `refresh_regions()` function that downloads the latest regions manifest from the Contentstack CDN and overwrites the bundled `data/regions.json`. - Export `refresh_regions` at the package level so CI pipelines and tooling can call it programmatically (`from contentstack_management import refresh_regions`). - Hook `setup.py` with a custom `BuildPyWithRegions` command so `regions.json` is refreshed automatically on every `python setup.py build` / `pip install`, keeping the bundled region data current without a manual step.
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
contentstack_management/region_refresh.pyexposing arefresh_regions()function that downloads the latest regions manifest from the Contentstack CDN and overwrites the bundleddata/regions.json.refresh_regionsat the package level so CI pipelines and tooling can call it programmatically (from contentstack_management import refresh_regions).setup.pywith a customBuildPyWithRegionscommand soregions.jsonis refreshed automatically on everypython setup.py build/pip install, keeping the bundled region data current without a manual step.